import re


def getDomain(url: str) -> str:
    my_reg = r"https?:\/{2}[^\/]*\/"
    match = re.match(pattern=my_reg, string=url)
    domain = url
    if match is not None:
        domain = match.group()
    return domain


if __name__ == '__main__':
    url = "https://www.example.test.com/"
    domain = getDomain(url=url)
    print(domain)
